
package dieci.hibernate;

import dieci.database.PersistentObject;
import dieci.system.*;
import java.util.Date;
import java.util.HashSet;
import java.util.Set;

/**
 *
 * @author DuckSys
 */
public class HibOrderRawMaterial implements PersistentObject{

    private Date orderRawMaterialDate;
    private long orderRawMaterialId;
    private Set<HibOrderRawMaterialDetails> details = new HashSet<>();
    private int supplierId;
    private double totalOrderRawMaterialAmount;

    public HibOrderRawMaterial()
    {
    }

    public HibOrderRawMaterial(OrderRawMaterial orderRawMaterial)
    {
        this.supplierId = orderRawMaterial.getSupplier().getSupplierId();
        this.orderRawMaterialDate = orderRawMaterial.getOrderRawMaterialDate();
        this.totalOrderRawMaterialAmount = orderRawMaterial.getTotalOrderRawMaterialAmount();
    }
    
    public HibOrderRawMaterial(long orderRawMaterialId, OrderRawMaterial orderRawMaterial)
    {
        this(orderRawMaterial);
        this.orderRawMaterialId = orderRawMaterialId;
    }
    
    
       /**
     * Get the value of totalOrderRawMaterialAmount
     *
     * @return the value of totalOrderRawMaterialAmount
     */
    public double getTotalOrderRawMaterialAmount()
    {
        return totalOrderRawMaterialAmount;
    }

    /**
     * Set the value of totalOrderRawMaterialAmount
     *
     * @param totalOrderRawMaterialAmount new value of totalOrderRawMaterialAmount
     */
    public void setTotalOrderRawMaterialAmount(double totalOrderRawMaterialAmount)
    {
        this.totalOrderRawMaterialAmount = totalOrderRawMaterialAmount;
    }

    
    /**
     * Get the value of supplierId
     *
     * @return the value of supplierId
     */
    public int getSupplierId()
    {
        return supplierId;
    }

    /**
     * Set the value of supplierId
     *
     * @param supplierId new value of supplierId
     */
    public void setSupplierId(int supplierId)
    {
        this.supplierId = supplierId;
    }

    /**
     * Get the value of details
     *
     * @return the value of details
     */
    public Set<HibOrderRawMaterialDetails> getDetails()
    {
        return details;
    }

    /**
     * Set the value of details
     *
     * @param details new value of details
     */
    public void setDetails(Set<HibOrderRawMaterialDetails> details)
    {
        this.details = details;
    }


    /**
     * Get the value of orderRawMaterialId
     *
     * @return the value of orderRawMaterialId
     */
    public long getOrderRawMaterialId()
    {
        return orderRawMaterialId;
    }

    /**
     * Set the value of orderRawMaterialId
     *
     * @param orderRawMaterialId new value of orderRawMaterialId
     */
    public void setOrderRawMaterialId(long orderRawMaterialId)
    {
        this.orderRawMaterialId = orderRawMaterialId;
    }

    /**
     * Get the value of orderRawMaterialDate
     *
     * @return the value of orderRawMaterialDate
     */
    public Date getOrderRawMaterialDate()
    {
        return orderRawMaterialDate;
    }

    /**
     * Set the value of orderRawMaterialDate
     *
     * @param orderRawMaterialDate new value of orderRawMaterialDate
     */
    public void setOrderRawMaterialDate(Date orderRawMaterialDate)
    {
        this.orderRawMaterialDate = orderRawMaterialDate;
    }

}
